<template>
  <div :class="['component__combo_card_new', kl_md.KLGL == 1 ? 'gelin-card' : '']">
    <div class="course-img">
        <img :src="detail.iconPath" alt="">
    </div>
    <div class="course-name">{{detail.courseName}}</div>
    <div class="course-info">
        <span class="info-left"><span>￥</span><span>{{detail.price}}</span></span>
        <span class="info-right">{{detail.acName}}</span>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  props: ["detail"],
  components: {},
  data() {
    return {};
  },
  computed: {
    ...mapState({
      is_ios(state) {
        return state.is_ios;
      },
      is_in_wechat(state) {
        return state.is_in_wechat;
      },
      member_discount(state) {
        return state.member_discount;
      },
      is_hidden_content(state) {
        return state.is_hidden_content;
      },
      kl_md(state) {
        return state.kl_md;
      },
      is_wechat_ios_limit(state) {
        return state.is_wechat_ios_limit;
      }
    }),
    is_show_price() {
      if (this.is_wechat_ios_limit) {
        return this.is_ios && this.is_in_wechat;
      } else {
        return false;
      }
    }
  },
  watch: {},
  methods: {
    toPath(id) {
      this.$router.push({
        path: "/m/combo-detail",
        query: {
          id
        }
      });
    }
  },
  created() {
    console.log(this.detail);
  },
  mounted() {}
};
</script>

<style lang="scss" scoped>
.component__combo_card_new {
    width: 2.112rem;
    height: 2.112rem;
    border-radius: .096rem;
    overflow: hidden;
    &.gelin-card{
      height: inherit;
      .course-img{
        height: 2.8085rem;
      }
    }
    .course-img{
        width: 2.112rem;
        height: 1.40736rem;
        // background: chartreuse;
        img{
            width: 100%;
            height: 100%;
            display: block;
        }
    }
    .course-name{
        width: 2.112rem;
        padding: .08rem .1344rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .course-info{
        width: 2.112rem;
        padding: 0 .1344rem;
        display: flex;
        justify-content: space-between;
        .info-left{
            font-size: .192rem;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: var(--theme-color);
        }
        .info-right{
            font-size: .192rem;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #999999;
        }
    }
}
</style>
<style lang="scss">
.component__combo_card_new {
}
</style>
